package com.travel.controller.admin;

import com.travel.result.Result;
import com.travel.service.impl.UserArticleServiceImpl;
import jakarta.websocket.server.PathParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author:Jasenon_ce
 * Date: 2025.04.19/下午6:37
 */
@RestController
@RequestMapping("/admin/forum")
public class AdminForumController {

    @Autowired
    private UserArticleServiceImpl userArticleService;

    @GetMapping("/top")
    public Result<?> top(@PathParam("article_id") Long articleId,@PathParam(value = "is_top") Boolean isTop){

        userArticleService.top(articleId,isTop);
        return Result.success();
    }

}
